24 PART 1 Getting Started with Biostatistics
When writing formulas with functions using software, be aware that each soft-
ware may have rules about case-sensitivity. It may require all caps, all lowercase,
or first-letter capitalization. Make sure to check the software’s documentation for
guidance (Chapter 4 discusses different statistical software packages.)
Simple and complicated formulas
Simple formulas have one or two numbers and only one mathematical operator
(for example, 5
3
). But most statistical formulas you’ll encounter are more
complicated, with two or more operators and variables.
Whether doing calculations manually or using software, you need to ensure that
you do your formula calculations in the correct order (called the order of operation).
If you evaluate the terms and operations in the formula in the wrong order, you
will get incorrect results. In a complicated formula, the order in which you evalu-
ate the terms and operations is governed by the interplay of several rules arranged
in a hierarchy. Most computer programs try to follow the customary conventions
that apply to typeset formulas, but you need to check software’s documentation to
be sure.
Here’s a typical set of operator hierarchy rules. Within each hierarchical level,
operations are carried out from left to right:
1.
Evaluate any terms and operations within parentheses, brackets, curly
braces, or absolute-value bars first, including terms inside parentheses that
follow the name of a function. Please note that nested functions are evaluated
inside out, so additional parentheses may be needed to prevent any confusion.
2.
Evaluate negation, factorials, powers, and roots.
3.
Evaluate multiplication and division.
4.
Evaluate addition and subtraction.
In a typeset fraction, evaluate terms and operations above the horizontal bar (the
numerator) first, then terms and operations below the bar (the denominator)
next. After that, divide the numerator by the denominator.
Equations
An equation has two expressions with an equal sign between them. Most equations
appearing in this book have a single variable name to the left of the equal sign and
a formula to the right, like this: SEM
SD
N
/
. This style of equation defines the
variable appearing on the left in terms of the calculations specified on the right.